<?php

namespace App\Http\Controllers\Api;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Input;
use Validator, Redirect, Session, Captcha;
use App\Http\Model\Article\Section;
use App\Http\Model\Article\Article;
class  MenuController extends Controller{
    public  function  index(Request $request){
        $section = Section::paginate(15);
       return json_success('获取成功',$section);
    }
    public  function  login(Request $request){
        if ($request->has('username')) {
            $username=$request->get('username');
        }else{
            return json_error('username为必填');
        }
        if ($request->has('password')) {
            $password=$request->get('password');
        }else{
            return json_error('password为必填');
        }
        return json_success('登录成功','随机guid----'.guid());
    }
}